import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)


export default new Router({
  routes: [
    // 路由重定向，默认打开推荐页
    {
      path:'/',
      redirect:'/index',
      name: "首页"
    },
    {
      path:'/index',
      component: resolve => require(['page/index/index'],resolve),
      name: "首页"
    },
    {
      path:'/bag',
      component: resolve => require(['page/bag/bag'],resolve),
      name: "商城页"
    },
    {
      path:'/shopping',
      component: resolve => require(['page/shopping/shopping'],resolve),
      name: "购物车"
    },
    {
      path:'/airticket',
      component: resolve => require(['page/index/airticket'],resolve),
      name: "机票页"
    },
    {
      path:'/mine',
      component: resolve => require(['page/mine/mine'],resolve),
      name: "我的"
    },
    {
      path: '/hotel',
      component: resolve => require(['page/index/hotel'],resolve),
      name: "酒店"
    },
    {
      path: '/car_rental',
      component: resolve => require(['page/index/car_rental'], resolve),
      name: "船车出租"
    },
    {
      path: '/restaurant',
      component: resolve => require(['page/index/restaurant'], resolve),
      name: "餐厅预订"
    },
    {
      path: '/activity',
      component: resolve => require(['page/index/activity'], resolve),
      name: "景区活动"
    },
    {
      path: '/diving',
      component: resolve => require(['page/index/diving'], resolve),
      name: "潜水预约"
    },
    {
      path: '/wedding_dress',
      component: resolve => require(['page/index/wedding_dress'], resolve),
      name: "婚纱拍照"
    },
    {
      path:'/buy',
      component: resolve => require(['page/index/buy_a_ticket'], resolve),
      name: "下单"
    },
    {
      path:'/order_detali',
      component: resolve => require(['page/mine/order_detalis'], resolve),
      name:'账单详情'
    },
    {
      path:'/login',
      component:resolve=>require(['page/login'],resolve),
      name:'登陆'
    }
  ]
})
